package problem.year2022.Month12

import cn.hutool.core.collection.CollectionUtil
import cn.hutool.core.collection.ListUtil
import cn.hutool.json.JSONUtil;
import java.util.function.Function;

/**
 * @author LiangMu
 * @version \$Id: D1222.java, v 0.1 2022年12月22日 14:49 LiangMu Exp $$
 */
class D1222 {
    static void main(String[] args) {
        def lgnMap = [
            "顺丰快递": "sf",
            "顺丰": "sf",
            "无"   : "无",
            "跨越物流": "kye",
            "跨越速运": "kye",
            "德邦物流": "debont",
            "安泰物流": "antaiwuliu",
            "专车"  : "123",
        ]
        def list = [
            [
                "单据号"   : "sn_20221222923181739088547840",
                "物料编码"  : 70100183,
                "物料名称"  : "四代锁（盾型 蓝色）",
                "应收/出数量": 1020,
                "创建人"   : "新翼仓储02",
                "备注"    : "已入库",
                "物流公司"  : "跨越速运",
                "快递单号"  : "KY4000150056155"
            ],
            [
                "单据号"    : "sn_20221222923129942792921088",
                "物料编码"   : 82300107,
                "物料名称"   : "G30退回电池纸箱仅外箱-偶玺",
                "应收/出数量" : 10000,
                "创建人"    : "上海偶玺实业",
                "备注"     : "已入库",
                "物流公司"   : "自送",
                "快递单号"   : "00000",
                "__EMPTY": "sn_20221213919838531856621568"
            ],
            [
                "单据号"   : "sn_20221221922786711354740736",
                "物料编码"  : 70100183,
                "物料名称"  : "四代锁（盾型 蓝色）",
                "应收/出数量": 1020,
                "创建人"   : "新翼仓储02",
                "备注"    : "已入库",
                "物流公司"  : "跨越速运",
                "快递单号"  : "KY4000120095536"
            ],
            [
                "单据号"    : "sn_20221221922722570334113792",
                "物料编码"   : 16400236,
                "物料名称"   : "M18后轮组",
                "应收/出数量" : 216,
                "创建人"    : "祝会东",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000099902704",
                "__EMPTY": "sn_20221207917723426943909888"
            ],
            [
                "单据号"    : "sn_20221220922419129300815872",
                "物料编码"   : 26400148,
                "物料名称"   : "十字限位机牙螺丝",
                "应收/出数量" : 200,
                "创建人"    : "新翼仓储02",
                "备注"     : "已入库",
                "物流公司"   : "无",
                "快递单号"   : "无",
                "__EMPTY": "sn_20221220922419129300815872"
            ],
            [
                "单据号"   : "sn_20221220922299991411843072",
                "物料编码"  : 26904119,
                "物料名称"  : "到位开关",
                "应收/出数量": 419,
                "创建人"   : "纽创物控01",
                "备注"    : "已入库",
                "物流公司"  : "无",
                "快递单号"  : "无"
            ],
            [
                "单据号"   : "sn_20221219922012943804010496",
                "物料编码"  : 70100071,
                "物料名称"  : "M10/Q19后轮组维修（213版本）",
                "应收/出数量": 324,
                "创建人"   : "台州金宇机电",
                "备注"    : "已入库",
                "物流公司"  : "博远物流",
                "快递单号"  : 111
            ],
            [
                "单据号"   : "sn_20221219922010692959264768",
                "物料编码"  : 13000052,
                "物料名称"  : "刹把(左右通用)",
                "应收/出数量": 20000,
                "创建人"   : "常州常马签收入库",
                "备注"    : "已入库",
                "物流公司"  : "专车",
                "快递单号"  : 111111111
            ],
            [
                "单据号"   : "sn_20221216920987204409364480",
                "物料编码"  : 70100183,
                "物料名称"  : "四代锁（盾型 蓝色）",
                "应收/出数量": 310,
                "创建人"   : "新翼仓储02",
                "备注"    : "已入库",
                "物流公司"  : "跨越速运",
                "快递单号"  : "KY4000098939986"
            ],
            [
                "单据号"   : "sn_20221216920986801286361088",
                "物料编码"  : 70100183,
                "物料名称"  : "四代锁（盾型 蓝色）",
                "应收/出数量": 200,
                "创建人"   : "新翼仓储02",
                "备注"    : "已入库",
                "物流公司"  : "跨越速运",
                "快递单号"  : "KY4000098939986"
            ],
            [
                "单据号"    : "sn_20221216920924627557081088",
                "物料编码"   : 12602562,
                "物料名称"   : "M10&M18转把衬套",
                "应收/出数量" : 11000,
                "创建人"    : "常州德普",
                "备注"     : "已入库",
                "物流公司"   : "丰通物流",
                "快递单号"   : "丰通物流-俞贝-苏DY666",
                "__EMPTY": "sn_20221216920924627557081088"
            ],
            [
                "单据号"    : "sn_20221215920679078165667840",
                "物料编码"   : 20307579,
                "物料名称"   : "M30电单车电池锁",
                "应收/出数量" : 20,
                "创建人"    : "惠州博实结",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000068998714",
                "__EMPTY": "sn_20221215920679078165667840"
            ],
            [
                "单据号"   : "sn_20221215920630705148583936",
                "物料编码"  : 70100183,
                "物料名称"  : "四代锁（盾型 蓝色）",
                "应收/出数量": 480,
                "创建人"   : "新翼仓储02",
                "备注"    : "已入库",
                "物流公司"  : "跨越速运",
                "快递单号"  : "KY4000068999518"
            ],
            [
                "单据号"   : "sn_20221215920607295303507968",
                "物料编码"  : 16400191,
                "物料名称"  : "E50前灯组件",
                "应收/出数量": 150,
                "创建人"   : "佛山晟迪",
                "备注"    : "已入库",
                "物流公司"  : "跨越速运",
                "快递单号"  : "KY4000058994997"
            ],
            [
                "单据号"    : "sn_20221215920578044869140480",
                "物料编码"   : 12700005,
                "物料名称"   : "S30/S35/A32/A40/A41/A50/A55车铃",
                "应收/出数量" : 50000,
                "创建人"    : "苏州新兴",
                "备注"     : "已入库",
                "物流公司"   : "自送",
                "快递单号"   : 2022121508,
                "__EMPTY": "sn_20221215920578044869140480"
            ],
            [
                "单据号"   : "sn_20221215920555958055211008",
                "物料编码"  : 26000020,
                "物料名称"  : "C50锁下壳",
                "应收/出数量": 2000,
                "创建人"   : "苏州童蒙养正",
                "备注"    : "已入库",
                "物流公司"  : "安能物流",
                "快递单号"  : "安能物流-金师傅-苏E3T718"
            ],
            [
                "单据号"   : "sn_20221215920539338251440128",
                "物料编码"  : 82300023,
                "物料名称"  : "车辆分类故障贴（每张28个小贴）",
                "应收/出数量": 120000,
                "创建人"   : "上海言琦",
                "备注"    : "已到仓库   格林系统无入库单",
                "物流公司"  : "安能物流",
                "快递单号"  : 500074097033
            ],
            [
                "单据号"    : "sn_20221215920520462230827008",
                "物料编码"   : 12500173,
                "物料名称"   : "M18右把套（防松）",
                "应收/出数量" : 10000,
                "创建人"    : "常州常马签收入库",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : 800107436135,
                "__EMPTY": "sn_20221215920520462230827008"
            ],
            [
                "单据号"    : "sn_20221215920497932496723968",
                "物料编码"   : 16001289,
                "物料名称"   : "C30/C40锁螺丝/Y10链罩支架3+连接器固定转换座4+天线盒1+后泥除脚左侧组装2",
                "应收/出数量" : 12180,
                "创建人"    : "苏州三永",
                "备注"     : "已入库",
                "物流公司"   : "顺丰",
                "快递单号"   : "SF1159322163813",
                "__EMPTY": "sn_20221215920497932496723968"
            ],
            [
                "单据号"    : "sn_20221214920159933243580416",
                "物料编码"   : 16000607,
                "物料名称"   : "Q18车把与前叉立管安装螺丝",
                "应收/出数量" : 1000,
                "创建人"    : "天津爱玛成品入库",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097947457",
                "__EMPTY": "sn_20221214920159933243580416"
            ],
            [
                "单据号"    : "sn_20221214920159898816606208",
                "物料编码"   : 12300072,
                "物料名称"   : "Y10车把",
                "应收/出数量" : 60,
                "创建人"    : "天津爱玛成品入库",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097947457",
                "__EMPTY": "sn_20221214920159898816606208"
            ],
            [
                "单据号"    : "sn_20221214920159722861486080",
                "物料编码"   : 16001511,
                "物料名称"   : "Y10车把壳安装螺丝",
                "应收/出数量" : 2000,
                "创建人"    : "天津爱玛成品入库",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097947457",
                "__EMPTY": "sn_20221214920159722861486080"
            ],
            [
                "单据号"    : "sn_20221214920159677076463616",
                "物料编码"   : 16001540,
                "物料名称"   : "Y10控制器安装螺丝",
                "应收/出数量" : 1000,
                "创建人"    : "天津爱玛成品入库",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097947457",
                "__EMPTY": "sn_20221214920159677076463616"
            ],
            [
                "单据号"    : "sn_20221214920159629995274240",
                "物料编码"   : 16000608,
                "物料名称"   : "Y10尾牌支架/Q18后反光器安装螺母",
                "应收/出数量" : 1000,
                "创建人"    : "天津爱玛成品入库",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097947457",
                "__EMPTY": "sn_20221214920159629995274240"
            ],
            [
                "单据号"    : "sn_20221214920159576617058304",
                "物料编码"   : 14700107,
                "物料名称"   : "Y10停车架",
                "应收/出数量" : 182,
                "创建人"    : "天津爱玛成品入库",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097947457",
                "__EMPTY": "sn_20221214920159576617058304"
            ],
            [
                "单据号"    : "sn_20221214920159487338733568",
                "物料编码"   : 16000597,
                "物料名称"   : "Q18电机保护盖/头管后盖/电池锁固定螺丝",
                "应收/出数量" : 4000,
                "创建人"    : "天津爱玛成品入库",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097947457",
                "__EMPTY": "sn_20221214920159487338733568"
            ],
            [
                "单据号"    : "sn_20221214920159179405389824",
                "物料编码"   : 16001512,
                "物料名称"   : "Y10-电量指示灯安装2+后泥除二维码1螺丝",
                "应收/出数量" : 1000,
                "创建人"    : "天津爱玛成品入库",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097947457",
                "__EMPTY": "sn_20221214920159179405389824"
            ],
            [
                "单据号"    : "sn_20221214920159143450312704",
                "物料编码"   : 16000298,
                "物料名称"   : "Y10避震器安装螺母/景区三四人车-M10防松螺母",
                "应收/出数量" : 1000,
                "创建人"    : "天津爱玛成品入库",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097947457",
                "__EMPTY": "sn_20221214920159143450312704"
            ],
            [
                "单据号"    : "sn_20221214920159081057349632",
                "物料编码"   : 16001510,
                "物料名称"   : "Y10电池锁组装3+放电插头底座3+放电插头4+后叉控制器盒盖板4+喇叭2螺丝",
                "应收/出数量" : 4000,
                "创建人"    : "天津爱玛成品入库",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097947457",
                "__EMPTY": "sn_20221214920159081057349632"
            ],
            [
                "单据号"    : "sn_20221214920151465652514816",
                "物料编码"   : 16400200,
                "物料名称"   : "S30/S35/A32/A40/A41/A50/A55塑料车篮(含三标)",
                "应收/出数量" : 826,
                "创建人"    : "迪盟斯尔",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 123,
                "__EMPTY": "sn_20221207917618316751716352"
            ],
            [
                "单据号"    : "sn_20221214920150909785726976",
                "物料编码"   : 12609082,
                "物料名称"   : "M10焕新后泥板（M18蓝）",
                "应收/出数量" : 1600,
                "创建人"    : "迪盟斯尔",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 123,
                "__EMPTY": "sn_20221214920150909785726976"
            ],
            [
                "单据号"    : "sn_20221214920150240802500608",
                "物料编码"   : 12600160,
                "物料名称"   : "M10焕新右平叉盖（黑）",
                "应收/出数量" : 10000,
                "创建人"    : "迪盟斯尔",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 123,
                "__EMPTY": "sn_20221214920150240802500608"
            ],
            [
                "单据号"    : "sn_20221214920150240802500608",
                "物料编码"   : 12600161,
                "物料名称"   : "M10焕新左平叉盖(黑）",
                "应收/出数量" : 10000,
                "创建人"    : "迪盟斯尔",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 123,
                "__EMPTY": "sn_20221214920150240802500608"
            ],
            [
                "单据号"   : "sn_20221213919941860322435072",
                "物料编码"  : 70100183,
                "物料名称"  : "四代锁（盾型 蓝色）",
                "应收/出数量": 600,
                "创建人"   : "新翼仓储02",
                "备注"    : "已入库",
                "物流公司"  : "跨越速运",
                "快递单号"  : "KY4000097949094"
            ],
            [
                "单据号"    : "sn_20221213919924532222226432",
                "物料编码"   : 14500031,
                "物料名称"   : "A41/A55座杆",
                "应收/出数量" : 14,
                "创建人"    : "系统",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097989656",
                "__EMPTY": "sn_20221213919924532222226432"
            ],
            [
                "单据号"    : "sn_20221213919924532222226432",
                "物料编码"   : 13400005,
                "物料名称"   : "A50/A55飞轮",
                "应收/出数量" : 23,
                "创建人"    : "系统",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097989656",
                "__EMPTY": "sn_20221213919924532222226432"
            ],
            [
                "单据号"    : "sn_20221213919924532222226432",
                "物料编码"   : 12900079,
                "物料名称"   : "S30/S35/A32/A40后刹车线2P管(1.8)",
                "应收/出数量" : 123,
                "创建人"    : "系统",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097989656",
                "__EMPTY": "sn_20221213919924532222226432"
            ],
            [
                "单据号"    : "sn_20221213919924532222226432",
                "物料编码"   : 13901015,
                "物料名称"   : "左脚踏E10/E20/E30/E50/S30/S35/A32/A40/A41/A50/A55",
                "应收/出数量" : 155,
                "创建人"    : "系统",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097989656",
                "__EMPTY": "sn_20221213919924532222226432"
            ],
            [
                "单据号"    : "sn_20221213919924532222226432",
                "物料编码"   : 12801014,
                "物料名称"   : "S30/S35/A32/A40抱闸(蓝色)",
                "应收/出数量" : 63,
                "创建人"    : "系统",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097989656",
                "__EMPTY": "sn_20221213919924532222226432"
            ],
            [
                "单据号"    : "sn_20221213919924532222226432",
                "物料编码"   : 16400200,
                "物料名称"   : "S30/S35/A32/A40/A41/A50/A55塑料车篮(含三标)",
                "应收/出数量" : 119,
                "创建人"    : "系统",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097989656",
                "__EMPTY": "sn_20221207917618316751716352"
            ],
            [
                "单据号"    : "sn_20221213919924532222226432",
                "物料编码"   : 15200015,
                "物料名称"   : "E50/M10反光片",
                "应收/出数量" : 173,
                "创建人"    : "系统",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097989656",
                "__EMPTY": "sn_20221213919924532222226432"
            ],
            [
                "单据号"    : "sn_20221213919924532222226432",
                "物料编码"   : 13500020,
                "物料名称"   : "A50/A55链条",
                "应收/出数量" : 17,
                "创建人"    : "系统",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097989656",
                "__EMPTY": "sn_20221213919924532222226432"
            ],
            [
                "单据号"    : "sn_20221213919924532222226432",
                "物料编码"   : 12600120,
                "物料名称"   : "S30/S35/A32/A40/A50太阳能板防护罩",
                "应收/出数量" : 282,
                "创建人"    : "系统",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097989656",
                "__EMPTY": "sn_20221213919924532222226432"
            ],
            [
                "单据号"    : "sn_20221213919924532222226432",
                "物料编码"   : 13401005,
                "物料名称"   : "S30/S35/A32/A40飞轮",
                "应收/出数量" : 30,
                "创建人"    : "系统",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000097989656",
                "__EMPTY": "sn_20221213919924532222226432"
            ],
            [
                "单据号"    : "sn_20221213919838531856621568",
                "物料编码"   : 82300107,
                "物料名称"   : "G30退回电池纸箱仅外箱-偶玺",
                "应收/出数量" : 10000,
                "创建人"    : "上海偶玺实业",
                "备注"     : "已入库",
                "物流公司"   : "自送",
                "快递单号"   : "00000",
                "__EMPTY": "sn_20221213919838531856621568"
            ],
            [
                "单据号"    : "sn_20221213919836494200823808",
                "物料编码"   : 82300109,
                "物料名称"   : "M10/M18后轮组专退纸箱-偶玺",
                "应收/出数量" : 1000,
                "创建人"    : "上海偶玺实业",
                "备注"     : "已入库",
                "物流公司"   : "自送",
                "快递单号"   : "00000",
                "__EMPTY": "sn_20221213919836494200823808"
            ],
            [
                "单据号"    : "sn_20221213919821519183347712",
                "物料编码"   : 12615678,
                "物料名称"   : "Q19右平叉护板",
                "应收/出数量" : 7000,
                "创建人"    : "浙江黄岩南达塑料模具有限公司",
                "备注"     : "已入库",
                "物流公司"   : "自送",
                "快递单号"   : 111,
                "__EMPTY": "sn_20221213919821519183347712"
            ],
            [
                "单据号"    : "sn_20221213919821414201421824",
                "物料编码"   : 12600965,
                "物料名称"   : "M18车把后盖（改款）",
                "应收/出数量" : 1000,
                "创建人"    : "浙江黄岩南达塑料模具有限公司",
                "备注"     : "已入库",
                "物流公司"   : "自送",
                "快递单号"   : 111,
                "__EMPTY": "sn_20221213919821414201421824"
            ],
            [
                "单据号"    : "sn_20221213919821414201421824",
                "物料编码"   : 12600964,
                "物料名称"   : "M18车把前盖（改款）",
                "应收/出数量" : 1000,
                "创建人"    : "浙江黄岩南达塑料模具有限公司",
                "备注"     : "已入库",
                "物流公司"   : "自送",
                "快递单号"   : 111,
                "__EMPTY": "sn_20221213919821414201421824"
            ],
            [
                "单据号"    : "sn_20221213919772201957130240",
                "物料编码"   : 27100115,
                "物料名称"   : "有桩车-tag片",
                "应收/出数量" : 400,
                "创建人"    : "wxxyruku4",
                "备注"     : "已入库",
                "物流公司"   : "无",
                "快递单号"   : "无",
                "__EMPTY": "sn_20221213919772201957130240"
            ],
            [
                "单据号"   : "sn_20221213919751035393605632",
                "物料编码"  : 20100225,
                "物料名称"  : "C55（小方形）",
                "应收/出数量": 228,
                "创建人"   : "丹阳凤凰签收入库",
                "备注"    : "已到仓库   格林系统无入库单",
                "物流公司"  : "无",
                "快递单号"  : "无"
            ],
            [
                "单据号"   : "sn_20221213919751035393605632",
                "物料编码"  : "20100008_RT005",
                "物料名称"  : "三代锁（盾型 蓝色)",
                "应收/出数量": 8,
                "创建人"   : "丹阳凤凰签收入库",
                "备注"    : "已到仓库   格林系统无入库单",
                "物流公司"  : "无",
                "快递单号"  : "无"
            ],
            [
                "单据号"   : "sn_20221213919751035393605632",
                "物料编码"  : "20100155_RT005",
                "物料名称"  : "四代锁（盾型 蓝色）",
                "应收/出数量": 220,
                "创建人"   : "丹阳凤凰签收入库",
                "备注"    : "已到仓库   格林系统无入库单",
                "物流公司"  : "无",
                "快递单号"  : "无"
            ],
            [
                "单据号"   : "sn_20221212919547310586658816",
                "物料编码"  : 70100183,
                "物料名称"  : "四代锁（盾型 蓝色）",
                "应收/出数量": 2610,
                "创建人"   : "新翼仓储02",
                "备注"    : "已入库",
                "物流公司"  : "跨越速运",
                "快递单号"  : "KY4000067978578"
            ],
            [
                "单据号"    : "sn_20221212919479647371517952",
                "物料编码"   : 16300085,
                "物料名称"   : "M10备胶泡棉",
                "应收/出数量" : 2000,
                "创建人"    : "苏州固圆",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000057913699",
                "__EMPTY": "sn_20221212919479647371517952"
            ],
            [
                "单据号"    : "sn_20221212919479238338670592",
                "物料编码"   : 16105624,
                "物料名称"   : "P20D二维码铭牌",
                "应收/出数量" : 1000,
                "创建人"    : "苏州固圆",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000057913699",
                "__EMPTY": "sn_20221212919479238338670592"
            ],
            [
                "单据号"    : "sn_20221212919478903259918336",
                "物料编码"   : 16105507,
                "物料名称"   : "备用二维码（高校）",
                "应收/出数量" : 5000,
                "创建人"    : "苏州固圆",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000057913699",
                "__EMPTY": "sn_20221212919478903259918336"
            ],
            [
                "单据号"    : "sn_20221212919478636523155456",
                "物料编码"   : 16105517,
                "物料名称"   : "二维码标签纸（最小单位：4000）",
                "应收/出数量" : 80000,
                "创建人"    : "苏州固圆",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000057913699",
                "__EMPTY": "sn_20221212919478636523155456"
            ],
            [
                "单据号"    : "sn_20221212919421911879249920",
                "物料编码"   : 12500026,
                "物料名称"   : "带夹环右把套",
                "应收/出数量" : 30000,
                "创建人"    : "天津骏泰科技有限公司",
                "备注"     : "已入库",
                "物流公司"   : "安能物流",
                "快递单号"   : 300521982816,
                "__EMPTY": "sn_20221212919421911879249920"
            ],
            [
                "单据号"    : "sn_20221212919421911879249920",
                "物料编码"   : 12500025,
                "物料名称"   : "带夹环左把套",
                "应收/出数量" : 30000,
                "创建人"    : "天津骏泰科技有限公司",
                "备注"     : "已入库",
                "物流公司"   : "安能物流",
                "快递单号"   : 300521982816,
                "__EMPTY": "sn_20221212919421911879249920"
            ],
            [
                "单据号"    : "sn_20221212919398431404785664",
                "物料编码"   : 12601066,
                "物料名称"   : "M18_踏板（印停车感应标）",
                "应收/出数量" : 3000,
                "创建人"    : "浙江绿源签收入库",
                "备注"     : "已入库",
                "物流公司"   : "自送",
                "快递单号"   : 13673396651,
                "__EMPTY": "sn_20221212919398431404785664"
            ],
            [
                "单据号"    : "sn_20221212919398431404785664",
                "物料编码"   : 12601040,
                "物料名称"   : "M18_下底板（改款）",
                "应收/出数量" : 3000,
                "创建人"    : "浙江绿源签收入库",
                "备注"     : "已入库",
                "物流公司"   : "自送",
                "快递单号"   : 13673396651,
                "__EMPTY": "sn_20221212919398431404785664"
            ],
            [
                "单据号"   : "sn_20221210918761039014592512",
                "物料编码"  : 16401252,
                "物料名称"  : "A40太阳能板(带DC充电口)/景区三四人车太阳能板",
                "应收/出数量": 4000,
                "创建人"   : "美格签署入库",
                "备注"    : "已入库",
                "物流公司"  : "恒路物流",
                "快递单号"  : 304497935
            ],
            [
                "单据号"    : "sn_20221210918729994575740928",
                "物料编码"   : 16301089,
                "物料名称"   : "E10/E20/S30/S35/A32/A40/A50坐垫套",
                "应收/出数量" : 9300,
                "创建人"    : "苏州众诺基",
                "备注"     : "已入库",
                "物流公司"   : "众基物流",
                "快递单号"   : 8300000008232,
                "__EMPTY": "sn_20221205916953374922440704"
            ],
            [
                "单据号"    : "sn_20221210918533839998410752",
                "物料编码"   : 20200125,
                "物料名称"   : "M30电单车天线盒",
                "应收/出数量" : 20,
                "创建人"    : "惠州博实结",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000086941820",
                "__EMPTY": "sn_20221210918533839998410752"
            ],
            [
                "单据号"    : "sn_20221209918500467798900736",
                "物料编码"   : 20307579,
                "物料名称"   : "M30电单车电池锁",
                "应收/出数量" : 30,
                "创建人"    : "惠州博实结",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "KY4000086941820",
                "__EMPTY": "sn_20221215920679078165667840"
            ],
            [
                "单据号"   : "sn_20221209918445914132443136",
                "物料编码"  : 70100183,
                "物料名称"  : "四代锁（盾型 蓝色）",
                "应收/出数量": 300,
                "创建人"   : "新翼仓储02",
                "备注"    : "已入库",
                "物流公司"  : "跨越速运",
                "快递单号"  : "KY4000086942615"
            ],
            [
                "单据号"   : "sn_20221209918406510000001024",
                "物料编码"  : 12501019,
                "物料名称"  : "左把套S30/S35/A32/A40/A41/A50/A55",
                "应收/出数量": 6000,
                "创建人"   : "常州崧硕",
                "备注"    : "已入库",
                "物流公司"  : "铁中物流",
                "快递单号"  : 1807752315
            ],
            [
                "单据号"   : "sn_20221209918406510000001024",
                "物料编码"  : 12501013,
                "物料名称"  : "右把套S30/S35/A32/A40/A41/A50/A55",
                "应收/出数量": 6000,
                "创建人"   : "常州崧硕",
                "备注"    : "已入库",
                "物流公司"  : "铁中物流",
                "快递单号"  : 1807752315
            ],
            [
                "单据号"    : "sn_20221209918384325852188672",
                "物料编码"   : 12100079,
                "物料名称"   : "M18叉肩组件",
                "应收/出数量" : 1500,
                "创建人"    : "天津众兴邦",
                "备注"     : "已入库",
                "物流公司"   : "自送",
                "快递单号"   : 11222354120,
                "__EMPTY": "sn_20221209918384325852188672"
            ],
            [
                "单据号"    : "sn_20221209918384282466181120",
                "物料编码"   : 12100081,
                "物料名称"   : "Q18前叉组件-旧（液压版本）",
                "应收/出数量" : 200,
                "创建人"    : "天津众兴邦",
                "备注"     : "已入库",
                "物流公司"   : "自送",
                "快递单号"   : 11234562431,
                "__EMPTY": "sn_20221209918384282466181120"
            ],
            [
                "单据号"    : "sn_20221209918365924954001408",
                "物料编码"   : 80300062,
                "物料名称"   : "PH0十字螺丝批头--百诺",
                "应收/出数量" : 1000,
                "创建人"    : "百诺众诚电子",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 20221209001,
                "__EMPTY": "sn_20221209918365924954001408"
            ],
            [
                "单据号"   : "sn_20221209918339089264459776",
                "物料编码"  : 27304443,
                "物料名称"  : "M10电池放电公端",
                "应收/出数量": 9,
                "创建人"   : "海固科技",
                "备注"    : "已入库",
                "物流公司"  : "顺丰",
                "快递单号"  : "SF1651296292213"
            ],
            [
                "单据号"   : "sn_20221209918306577330913280",
                "物料编码"  : 70100167,
                "物料名称"  : "唐泽涨闸锁维修-黑色",
                "应收/出数量": 210,
                "创建人"   : "天津唐泽",
                "备注"    : "已入库",
                "物流公司"  : "自送",
                "快递单号"  : 1
            ],
            [
                "单据号"   : "sn_20221209918306274271223808",
                "物料编码"  : 70100167,
                "物料名称"  : "唐泽涨闸锁维修-黑色",
                "应收/出数量": 260,
                "创建人"   : "天津唐泽",
                "备注"    : "已入库",
                "物流公司"  : "自送",
                "快递单号"  : 1
            ],
            [
                "单据号"    : "sn_20221208918065212516909056",
                "物料编码"   : 12600212,
                "物料名称"   : "M18/Q18线夹",
                "应收/出数量" : 3080,
                "创建人"    : "浙江绿源签收入库",
                "备注"     : "已入库",
                "物流公司"   : "顺丰",
                "快递单号"   : "SF1158765441440",
                "__EMPTY": "sn_20221208918065212516909056"
            ],
            [
                "单据号"    : "sn_20221208918039573109596160",
                "物料编码"   : 12900066,
                "物料名称"   : "A50/A50T/A55后刹车线2P管(1.8)",
                "应收/出数量" : 3000,
                "创建人"    : "泰州唐泽",
                "备注"     : "已入库",
                "物流公司"   : "自送",
                "快递单号"   : "自送-吉恒喜-苏MB5266",
                "__EMPTY": "sn_20221208918039573109596160"
            ],
            [
                "单据号"    : "sn_20221208917962643559096320",
                "物料编码"   : 14400113,
                "物料名称"   : "Q18座垫皮套",
                "应收/出数量" : 2000,
                "创建人"    : "天津嘉思特",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : "专车-李永-津C28U53",
                "__EMPTY": "sn_20221208917962643559096320"
            ],
            [
                "单据号"    : "sn_20221207917723426943909888",
                "物料编码"   : 16400236,
                "物料名称"   : "M18后轮组",
                "应收/出数量" : 324,
                "创建人"    : "祝会东",
                "备注"     : "已入库",
                "物流公司"   : "跨越速运",
                "快递单号"   : "XD221207-8005252",
                "__EMPTY": "sn_20221207917723426943909888"
            ],
            [
                "单据号"   : "sn_20221207917645508099088384",
                "物料编码"  : 27304443,
                "物料名称"  : "M10电池放电公端",
                "应收/出数量": 2991,
                "创建人"   : "海固科技",
                "备注"    : "已入库",
                "物流公司"  : "跨越速运",
                "快递单号"  : "KY4000095930996"
            ],
            [
                "单据号"    : "sn_20221207917618316751716352",
                "物料编码"   : 16400200,
                "物料名称"   : "S30/S35/A32/A40/A41/A50/A55塑料车篮(含三标)",
                "应收/出数量" : 7174,
                "创建人"    : "天津万德",
                "备注"     : "已入库",
                "物流公司"   : "自送",
                "快递单号"   : 202212070000220,
                "__EMPTY": "sn_20221207917618316751716352"
            ],
            [
                "单据号"    : "sn_20221206917382826812940288",
                "物料编码"   : 16000242,
                "物料名称"   : "M10/M18/E50二维码安装螺丝",
                "应收/出数量" : 90000,
                "创建人"    : "廊坊君宝",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 20221206,
                "__EMPTY": "sn_20221206917380897634426880"
            ],
            [
                "单据号"    : "sn_20221206917382287541190656",
                "物料编码"   : 16300079,
                "物料名称"   : "M10前轮轴",
                "应收/出数量" : 300,
                "创建人"    : "廊坊君宝",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 20221206,
                "__EMPTY": "sn_20221206917382287541190656"
            ],
            [
                "单据号"    : "sn_20221206917381870266155008",
                "物料编码"   : 16001332,
                "物料名称"   : "S30/S35/A32/A40/A41车篮固定螺丝",
                "应收/出数量" : 10000,
                "创建人"    : "廊坊君宝",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 20221206,
                "__EMPTY": "sn_20221206917381870266155008"
            ],
            [
                "单据号"    : "sn_20221206917381678427078656",
                "物料编码"   : 16000414,
                "物料名称"   : "M18&Q18踏板与车架螺丝",
                "应收/出数量" : 50000,
                "创建人"    : "廊坊君宝",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 20221206,
                "__EMPTY": "sn_20221206917381678427078656"
            ],
            [
                "单据号"    : "sn_20221206917381678427078656",
                "物料编码"   : 16000403,
                "物料名称"   : "M18&Q18前泥板与前叉/座桶/后泥板与勾爪安装螺丝",
                "应收/出数量" : 50000,
                "创建人"    : "廊坊君宝",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 20221206,
                "__EMPTY": "sn_20221206917381678427078656"
            ],
            [
                "单据号"    : "sn_20221206917381253582340096",
                "物料编码"   : 16000034,
                "物料名称"   : "E50/M10菜篮安装螺丝",
                "应收/出数量" : 80000,
                "创建人"    : "廊坊君宝",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 20221206,
                "__EMPTY": "sn_20221206917381253582340096"
            ],
            [
                "单据号"    : "sn_20221206917380897634426880",
                "物料编码"   : 16000242,
                "物料名称"   : "M10/M18/E50二维码安装螺丝",
                "应收/出数量" : 10000,
                "创建人"    : "廊坊君宝",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 20221206,
                "__EMPTY": "sn_20221206917380897634426880"
            ],
            [
                "单据号"    : "sn_20221206917380624645947392",
                "物料编码"   : 16000246,
                "物料名称"   : "E50/M10锁安装螺丝",
                "应收/出数量" : 5000,
                "创建人"    : "廊坊君宝",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 20221206,
                "__EMPTY": "sn_20221206917380624645947392"
            ],
            [
                "单据号"    : "sn_20221206917380340909670400",
                "物料编码"   : 16001397,
                "物料名称"   : "C50锁螺丝",
                "应收/出数量" : 30000,
                "创建人"    : "廊坊君宝",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 20221206,
                "__EMPTY": "sn_20221206917380340909670400"
            ],
            [
                "单据号"    : "sn_20221206917380104728920064",
                "物料编码"   : 16001397,
                "物料名称"   : "C50锁螺丝",
                "应收/出数量" : 30000,
                "创建人"    : "廊坊君宝",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 20221206,
                "__EMPTY": "sn_20221206917380340909670400"
            ],
            [
                "单据号"    : "sn_20221206917379856054525952",
                "物料编码"   : 16000395,
                "物料名称"   : "TK10头盔菜篮/A58菜篮安装螺丝",
                "应收/出数量" : 60000,
                "创建人"    : "廊坊君宝",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 20221206,
                "__EMPTY": "sn_20221206917379856054525952"
            ],
            [
                "单据号"    : "sn_20221206917379449310199808",
                "物料编码"   : 16000230,
                "物料名称"   : "M10车把后壳与车把/控制器与车架螺丝",
                "应收/出数量" : 10000,
                "创建人"    : "廊坊君宝",
                "备注"     : "已入库",
                "物流公司"   : "专车",
                "快递单号"   : 20221206,
                "__EMPTY": "sn_20221206917379449310199808"
            ],
            [
                "单据号"    : "sn_20221206917293719996661760",
                "物料编码"   : 16300180,
                "物料名称"   : "M18锁钩",
                "应收/出数量" : 200,
                "创建人"    : "德州鲁佳",
                "备注"     : "已入库",
                "物流公司"   : "德邦物流",
                "快递单号"   : 123456,
                "__EMPTY": "sn_20221206917293719996661760"
            ],
            [
                "单据号"    : "sn_20221206917255916273336320",
                "物料编码"   : 14400829,
                "物料名称"   : "Q19座垫皮套",
                "应收/出数量" : 2000,
                "创建人"    : "祝会东",
                "备注"     : "已入库",
                "物流公司"   : "自提",
                "快递单号"   : 20221206002,
                "__EMPTY": "sn_20221206917255916273336320"
            ]
        ]
        list = list.findAll { it.get("备注") == '已入库' }
        list = CollectionUtil.distinct(list, { it["单据号"] } as Function<Map, String>, Boolean.FALSE)
        ListUtil.partition(list, 5).each {
            def data = []
            def tmp = [
                "key" : "GLIN_HANDLER_TASK",
                "data": data
            ]
            it.each {
                def item = [
                    "orderNo"      : "${it['单据号']}",
                    "operator"     : "22609be8032a4bdaa8dc273f236f6e96",
                    "operatorName" : "乔帅峰",
                    "logisticsNo"  : "${it["快递单号"]}",
                    "logisticsName": "${it["物流公司"]}",
                    "logisticsSn"  : lgnMap.containsKey(it["物流公司"]) ? lgnMap.get(it["物流公司"]) : "123"
                ]
                data << item
            }
            println JSONUtil.toJsonStr(tmp)
        }
    }
}
